docs(core): document PageScrollLockController like other 2nd-gen controllers - #6534
Conversation
…rollers Move the controller from a bare file into the standard controller folder layout (index.ts, src/, stories/, test/, .mdx) so it gets Storybook docs and demo stories like every other 2nd-gen controller. Wires the new export path into core/package.json.
|
📚 Branch Preview Links🔍 Gen1 Visual Regression Test ResultsWhen a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:
Deployed to Azure Blob Storage: If the changes are expected, update the |
Drop the separate status readout component and the two-host stacked-locks story. One host with a lock/unlock toggle is enough to demonstrate the controller, which has no host interface requirement of its own.
…r page Behaviors and Accessibility rendered the exact same lock/unlock toggle as Overview, so the docs page repeated one live demo three times. Keep the section headings and prose but drop the duplicate Canvas instances, and strip the demo button's custom styles since native button styling is enough.
Rajdeepc
left a comment
There was a problem hiding this comment.
nit: If you can add an Accessibility story in this direction that would cover the entire flow.
add StackedLocks, two demo-scroll-lock-host instances side by side:
export const StackedLocks: Story = {
render: () => html`
<demo-scroll-lock-host></demo-scroll-lock-host>
<demo-scroll-lock-host></demo-scroll-lock-host>
${scrollFiller}
`,
tags: ['behaviors'],
parameters: { flexLayout: 'row-wrap' },
};
StackedLocks.storyName = 'Stacked locks';Proves reference counting: lock A, lock B, unlock A (still locked), unlock B (now unlocked). Add under ### Lock and unlock in the MDX.
Accessibility story — just needs to exist so the MDX Canvas has a target:
export const Accessibility: Story = {
tags: ['a11y'],
};Then add at the end of ## Accessibility in the MDX.
Description
Moves
PageScrollLockControllerinto the standard 2nd-gen controller folder layout (controllers/page-scroll-lock-controller/{index.ts,src/,stories/,test/,page-scroll-lock-controller.mdx}), matchingcolor-controller,hover-controller,pending-controller, etc. No behavior change to the controller.Adds:
./controllers/page-scroll-lock-controller.jspackage exportMotivation and context
This was the only 2nd-gen controller without a folder, stories, or docs page.
Related issue(s)
Screenshots (if appropriate)
N/A — docs-only change.
Author's checklist
Reviewer's checklist
patch,minor, ormajorfeaturesManual review test cases
Docs page renders
Controllers/Page scroll lock controllerLock/unlock toggle
Device review
Accessibility testing checklist
Keyboard (required — document steps below)
<button>; activates with Enter/Spaceswc-popover) see no keyboard regressionsScreen reader (required — document steps below)
overflowondocument.documentElement